Enumerations | ||
MixedWeightOptions | Tags weighting options. | |
QuasiAlgorithms | Tags for Gradient-based optimization algorithms. |
Public methods | ||
BlackBox | Create a blackbox objective. |
Public fields | ||
A | ||
alphas | ||
elast | ||
x | ||
xpon | ||
Public methods | ||
CES | Create a constant elasticity of subsitution objective. | |
vfunc | virtual | Compute CES. |
Public fields | ||
A | ||
alphas | ||
x | ||
Public methods | ||
AnalyticGradient | virtual | |
CobbDouglas | Create a CobbDouglas objective. | |
vfunc | virtual | \(A{\prod}_{i=1}^N x_i^{\alpha_i}\). |
Public methods | ||
CheckPoint | virtual | Store current state of a Constrained Objective (checkpoint to disk). |
Constrained | Create a constrained objective. | |
equality | virtual | Default Equality Constraints. |
funclist | Compute the objective and constraints at multiple points. | |
Gradient | virtual | Compute the ∇f(), objective's gradient at the current vector. |
inequality | virtual | Default InEquality Constraints. |
Jacobian | virtual | Compute the Jg(), vector version of the Lagrangian's Jacobian at the current vector. |
Lagrangian | Decode the input, return the whole vector, inequality and equality constraints, if any. | |
Merit | virtual |
Public methods | ||
Vec |
Public fields | ||
data | const | path or prediction object. |
stage | estimation stage. | |
tplist | transition parameters . | |
uplist | utility parameters . | |
Public methods | ||
DataObjective | An objective based on an economic model with data and (possibly) a nested solution method. | |
SetStage | Set the estimation stage. | |
TwoStage | Specify the objective as two stage. | |
vfunc | virtual | Calls and returns data->EconometricObjective() or uses SemiClosedForm() if in Gradient
calculation. |
AuxiliaryOutcome
to
to the DP, which would then always average across states and household types to the fixed factor.PathPrediction
of length \(T\) starting from exogenous
initial conditions.Public fields | ||
aggF | const | list of aggregate prod. |
deprec | const | 0.0 or vector of quantity depreciations. |
foc | computed system. | |
Q | aggregate Qs from prediction. | |
Qcols | const | columns of pred that match up to inputs. |
stnpred | const | ergodic distribution PathPrediction. |
T | const | number of periods in equilibrium. |
Public methods | ||
Equilibrium | Create a system of aggregate equilibrium equations. | |
Prints a message and details about the objective. | ||
vfunc | virtual | Built-in system of equations for Equilibrium models. |
Public fields | ||
ghk | const | |
sigfree | const | |
SigLT | const | |
Public methods | ||
GHKMNP | GHK based objective for MNP log likelihood. | |
SetGHK | ||
vfunc | Compute and return the vector of log-likelihoods at the current parameters. | |
Enumerations | ||
Anonymous enum 1 |
Public fields | ||
Npts | const | # of nodes in quadrature |
Public methods | ||
GQMNP | Gauss-Hermite based objective for MNP log likelihood. | |
vfunc | Compute and return the vector of log-likelihoods at the current parameters. |
Public methods | ||
aggregate |
Public fields | ||
D | const | # observed types, environment |
DK | const | D x K |
dkfree | ||
DKL | const | |
Dvar | const | Discrete environment-type var |
FinL | ||
Flabels | ||
Included | matrix of indicators of valid d,k combos | |
lfree | ||
mcur | const | |
nfree | ||
WStart | ||
Public methods | ||
CheckMax | virtual | If scur.v > maxpt.v call Save and update maxpt . |
Decode | virtual | Decode and return the parameter array. |
Encode | virtual | . |
fobj | Decode the input, compute the objective, check the maximum. | |
funclist | virtual | Compute the objective at multiple points. |
Gradient | virtual | Compute the ∇f(), objective's gradient at the current vector. |
IncludedDK | Indicate with (d,k) combinations should be computed. | |
Jacobian | virtual | Compute the Jg(), vector version of the objective's Jacobian at the current vector. |
Mixture | Create a mixture objective. | |
vfunc | virtual | |
vobj | virtual | Decode the input, return the whole vector. |
WDecode | ||
WEncode | ||
Wfunclist | virtual |
Public methods | ||
MLogit | Create a multinomial logit model. | |
vfunc | Return the log-likelihood vector. |
Public fields | ||
betas | const | Array of J-1 parameter blocks, one for each equation except Y=0. |
D | matrix of XB indices. | |
indY | const | N x J matrix of permutations the first column is index of Y second column is first non-Y choice third column is second non-Y choice etc. |
J | const | J : number of options |
Jvals | const | integer codes of choices |
lk | vector or matrix of likelihods. | |
namearray | const | Labels for variables |
NN | const | indexing vector |
nX | const | K : number of X variables |
X | const | X : matrix of exog variables |
Y | const | Y : discrete endog vector |
Public methods | ||
Estimate | ||
MultiNomialChoice | Create a new Multinomial Choice Model model. | |
SetD | Update \(XB\) matrix of indices by observation and option. |
Public fields | ||
model | ||
modelmethod | ||
v | ||
Public methods | ||
NoObjective | A wrapper that acts like an objective but just calls a model's Solve method and returns 1.0. | |
vfunc |
Public fields | ||
DoNotConstrain | This objective uses raw parameter values. | |
dStepLinearGap | static const | |
EXT | static const | Extension for Load and
Save files, =optobj. |
Flabels | array free parameter labels | |
fname | const | Name for Load & files |
fshold | holds DoNotVary vector for temp. | |
INGRADIENT | TRUE when computing Gradient, can be used by semi-closed form gradient methods. | |
L | const | label. |
logf | log file | |
lognm | const | name of log file |
maxpt | const | Best so far |
MyVersion | static | Version of niqlow that code is written for. |
newmax | Set in CheckMax(), TRUE if latest check was new max. | |
nfree | length of F in current cycle. | |
nstruct | length of X. | |
NvfuncTerms | Longest vector returned by vfunc(), default=1. | |
once | TRUE if encoded once | |
p2p | P2P object for using MPI across param vectors | |
PsiL | all parameter labels | |
PsiType | parameter class names | |
RunSafe | TRUE (default): exit if NaNs encountered during iteration FALSE: exit with IterationFailed |
|
Start | Initial vector after Encode() | |
subp2p | P2P object for MPI on a single param vector. | |
vcur | const | current point. |
Volume | Output Level. | |
Warned | static | . |
Public methods | ||
AggSubProbMat | virtual | |
Block | virtual | |
CheckMax | virtual | If vcur.v > maxpt.v call Save() and update maxpt . |
CheckMaxV | Compare v to maxpt. | |
CheckPoint | virtual | Load or save state of the problem to a file. |
contour | virtual | Graph the level curves of the objective in two parameters. |
Decode | virtual | Decode a vector of free variables. |
Encode | virtual | Encode vector of structural parameters. |
fobj | virtual | Decode the input, compute the objective, check the maximum. |
FreeStatus | Preserve the state of free or fixed status of the parameter vector. | |
funclist | virtual | Compute the objective at multiple points. |
Gradient | virtual | Compute the ∇f(), objective's gradient at the current vector. |
Hessian | virtual | Compute the Hf(), Hessian of objective at the current vector. |
Interact | virtual | |
Jacobian | virtual | Compute the Jg(), vector version of the objective's Jacobian at the current vector. |
Load | Load state of the problem. | |
Menu | virtual | |
Objective | Create a new objective. | |
Parameters | virtual | Add Parameters to the parameter list to be optimized over. |
virtual | Prints a message and details about the objective. | |
Recode | virtual | Reset the free parameter vector and the complete structural parameter vector. |
ReInitialize | virtual | Revert all parameters to their hard-coded initial values. |
ResetMax | virtual | Reset the value of the current and maximum objective. |
Save | Store current state (checkpoint to disk). | |
SetAggregation | Set the formula . | |
SetVersion | static | Checks the version number you send with the current version of niqlow. |
ToggleBlockElements | virtual | Toggle DoNotVary for one or more parameters. |
ToggleParameterConstraint | Toggle the value of DoNotConstrain. | |
ToggleParams | virtual | Toggle DoNotVary for one or more parameters. |
vfunc | virtual | Built in objective, f(ψ). |
vobj | virtual | Decode the input, return the whole vector. |
Public fields | ||
ipar | ||
isys | ||
msys | const | |
Public methods | ||
CheckMax | This is misnamed. | |
OneDimSystem | Create a new non-linear equation. | |
ResetMax | Reset the value of the system. | |
SetOneDim | ||
vfunc | virtual |
Public fields | ||
C | Number of common parameters | |
CDNV | ||
ComInd | Vector of indices into Psi of common pars | |
Flabels | . | |
Included | ||
K | const | # unobserved types, sub-problems |
kfree | K Vector of free specific parameters | |
KL | const | labels for types / sub problems |
kNvf | ||
Kvar | const | Discrete sub-problem var |
nfree | Total free parameters | |
NvfuncTerms | Longest vector returned by vfunc(), default=1. | |
scur | const | |
Public methods | ||
CheckMax | virtual | If scur.v > maxpt.v call Save and update maxpt . |
Common | virtual | Add parameters to the objective that will have a single value across types/sub-problems. |
Decode | virtual | Decode and return the structural parameter matrix. |
Encode | virtual | Encode matrix of structural parameters. |
fobj | virtual | Decode the input, compute the objective, check the maximum. |
funclist | virtual | Compute the objective at multiple points. |
Gradient | virtual | Compute the ∇f(), objective's gradient at the current vector. |
Jacobian | virtual | Compute the Jg(), vector version of the objective's Jacobian at the current vector. |
virtual | . | |
Separable | Create a separable objective. | |
vfunc | virtual | |
vobj | virtual | Decode the input, return the whole vector. |
Public fields | ||
eq1 | 1 equation of system. | |
normexp | ||
Public methods | ||
EndOneDim | ||
equations | virtual | Default system of equations: vfunc(). |
SetOneDim | virtual | |
System | Create a new system of equations object. |
Public methods | ||
Gradient | virtual | Compute the ∇f(), objective's gradient at the current vector. |
UnConstrained | Create an unconstrained objective. |
L | string, a label for the problem. |
L | label |
alphas | CV-compatiable vector of weights/shares. Default is <0.5;0.5> |
elast | elasticity parameter ε. The exponent on each input is computed as (elast-1)/elast. Default is -2.0 |
A | constant term (TFP). Default is 1.0 |
labels | 0 or array of labels for arguments. $$A\left( {\sum}_{i=1}^N \alpha_ix_i^s \right)^{1/s}$$ $$s \equiv {\epsilon-1 \over \epsilon}.$$ |
U = new CES("U"); U -> ToggleParameterConstraint();
L | label |
alphas | CV-compatiable vector of exponents. |
labels | 0 or array of labels for arguments. Sets the parameter vector as \(x\) equal to StDeviations of the same dimension as alphas $$A{\prod}_{i=1}^N x_i^{\alpha_i}$$ |
f |
saving |
L | label |
ELorN | Number of equality constraints (integer, array of strings, string list of names) |
IELorN | Number of inequality constraints |
Fmat, | Nf×J matrix of column vectors to evaluate at |
F | vector of free parameters. |
L | string, label |
data | an object that includes member FN and method EconometricObjective. Typically, OutcomeDataSet or PredictionDataSet object (including the possibility of the derived OutcomeDataSet and PredictionDataSet variety). |
... | Parameters and arrays of Parameters to optimize over. |
data.FN
, the total number of paths in the panel
stage | Zero, One or Two
|
tplist | a Parameter or a list of parameters that affect the transition only. These will be estimated at Stage 0 or Stage 2 |
uplist | a Parameter list of parameters that affect Utility only. These will be estimated at Stage 1 or Stage 2. |
data->EconometricObjective()
or uses SemiClosedForm() if in Gradient
calculation.
L | label |
T | number of periods of static equilibria. 1 [default] |
P | an array of parameters or a parameter block of prices \(p\) 0 [default] a vector of StDeviations is created of the same length as the parameter list of aggF
This should be called in the creator function of a derived equilibrium class after the following constants have
been initialized inside the creator:
|
orig | string, origin of the print call |
fn | integer, no print to file. file, prints to file as well as screen |
toscreen | TRUE: print full report to screen as wellFALSE: only print orig to screen |
Enumerations | ||
Anonymous enum 1 | identity, onlydiag, lowertriangle, SigmaOptions |
L |
fn |
Yname |
Xnames |
iSigma |
Npts |
fn |
Yname |
Xnames |
scur.v > maxpt.v
call Save and update maxpt
.
fn | file name |
F | vector of free parameters. |
F | vector of free parameters. |
Fmat, | Nf×J matrix of column vectors to evaluate at |
aFvec, | address of a ?×J matrix to return f() in. |
afvec, | 0 or address to return aggregated values in. |
mDK | D×K matrix of 0s/1s |
L | string, a label for the problem. |
Dvar, | integer>0, the number of environments Discrete variable that codes the environment |
Kvar, | integer>0, the number of types Discrete variable that codes the types |
MixType, | MixedWeightOptions |
... | D×K matrix or D-array of values No optional argument means Lambda[d] = new Simplex("L"+sprint("%2u",d),K), for d = 0, … D‾ A single argument, then it must be a D×K matrix Lambda[d] = new Simplex("L"+sprint("%2u",d),va[0][d][]), for d = 0, … D‾ D arguments, then each must be a ParameterBlock of size K and Lambda[d] = va[d] for d = 0, … D‾ |
F | vector of free parameters. |
L | label |
fn | string, a file to load the data from using Ox Database.Load()
|
Yname | string, name or label of the column in the file that contains Y Yname can contain any integers. MNP will translate the unique sorted values into 0...Jvals-1 |
Xnames | a string of the form var1 var2 ... varN |
L | label |
fn | string, a file to load the data from using Ox Database.Load()
|
Yname | string, name or label of the column in the file that contains Y Yname can contain any integers. MNP will translate the unique sorted values into 0...Jvals-1 |
Xnames | a string of the form var1 var2 ... varN |
model | Object with a method named Solve() or a member named method with
a method named Solve() |
vcur.v > maxpt.v
call Save() and update maxpt
.
fn | file name |
v | value of objective |
fn | file name to print to Output is determined by Volume |
f | file object |
saving | TRUE: save status to the file FALSE: load from the file and close it, call Encode |
F, | nfree x 1 vector of optimized parameters. 0 [default], use vcur.F for decode |
inX | 0 [default] get new starting values from the parameters a vector, new starting values. |
Encode()
and starting values will be retrieved from the current values of
parameters.optobj.
F | vector of free parameters. |
extcall | TRUE [default] go into server mode if MPI server, send Stop if client |
Store | TRUE, store the current status FALSE restore after a previous store |
Fmat, | Nf×J matrix of column vectors to evaluate at |
aFvec, | address of a ?×J matrix to return f() in. |
afvec, | 0 or address to return aggregated values in (as a 1 × J ROW vector) |
abest, | 0 or address to return index of best vector The maximum value is also computed and checked. |
extcall | [default=TRUE]. if running in parallel Stop message sent out
vcur.G
Any derived Objective can replace this virtual method with one that computes analytic gradients or other
approaches.
|
fname | string, name of file 0 [default], use the default name, the label with spaces removed -1, do nothing and return FALSE. |
DONOTVARY
for each parameter. The value of F is ignored by Load. Encode() called by Load.
L | string, label for the objective. |
CreateCur | create a new Point in vcur |
... | the first or next (and possibly only) parameter to add to the objective array: any argument can send an array which contains only parameters and blocks |
orig | string, origin of the print call |
fn | integer, no print to file. file, prints to file as well as screen |
toscreen | TRUE: print full report to screen as wellFALSE: only print orig to screen |
HardCode | TRUE=hard-coded parameter values used. FALSE [default] Start vector used Must be called anytime a change in constraints is made. So it is called by Encode() and ReInitialize() |
IterationFailed
fname | string, name of file 0 [default] use fname |
AggType |
v | integer [default=200] |
pblock | ParameterBlock |
elements | vector of indices of block elements to toggle. |
... | Parameters or arrays of parameter To toggle elements of a parameter block ... |
F | vector of free parameters. |
fn | file name |
L | label for the system. |
msys | System object that is the mother system 0 [default] no mother system A system of this type can be solved using OneDimSolve |
insys |
inpar |
scur.v > maxpt.v
call Save and update maxpt
.
fn | file name |
... | Parameter(s) and/or arrays of Parameters to add to the objective |
vfunc()
common parameters will have the same value for each k.
F | vector of free parameters. |
X | 0 get starting values from current X vector N×1, common starting values across types matrix N×K, starting values for all types. Only first column value used for common types |
CallBase | TRUE, simply call Encode(), used in parallel processing. FALSE (default), proceed with separable encoding |
F | vector of free parameters. |
Fmat, | Nf×J matrix of column vectors to evaluate at |
aFvec, | address of a ?×J matrix to return f() in. |
afvec, | 0 or address to return aggregated values in. |
cur.J
.
L | string, a label for the problem. |
Kvar, | integer>0, the number of sub objectives Discrete variable that codes the problem vector or ParameterBlock, weights on values of k |
F | vector of free parameters. |
insys | if eq1 an object then the equation index to select [default=0] |
inpar | if eq1 an object the parameter or parameter index to vary. |
L | label for the system. |
LorN | The size of the system indicated in 1 of 3 ways: integer [default = 1], N the size of the system array of length N, where each element is a string, the label for the equation. string with N space-separate labels, the labels of the equations parsed by varlist. |
3x3
system of equations:
mysys = new System(3); mysys = new System({"A","B","C"}); mysys = new System("Eq0 Eq2 Eq2");
∇ f(ψ)Stored in
vcur.G
L | label |